package com.nmsl.statistic.controller;

import com.nmsl.common.core.controller.BaseController;
import com.nmsl.common.core.page.TableDataInfo;
import com.nmsl.statistic.domain.RetailAtt;
import com.nmsl.statistic.domain.TollManage;
import com.nmsl.statistic.service.impl.RetailAttServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.nmsl.common.utils.PageUtils.startPage;

@RestController
@RequestMapping("/chaeckattr")
public class CheckAttrController extends BaseController {
    @Autowired
    private RetailAttServiceImpl retailAttService;
    @GetMapping("/list")
    public TableDataInfo list(TollManage tollManage)
    {
        startPage();
        RetailAtt retailAtt = new RetailAtt();
        BeanUtils.copyProperties(tollManage,retailAtt);

        List<RetailAtt> retailAtts1 = retailAttService.selectCheackAttList(retailAtt,
                tollManage.getTollManageId()
                ,tollManage.getPatientName());
        return getDataTable(retailAtts1);
    }

}
